﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalInfo.aspx.cs" Inherits="BOH.Information.PersonalInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
     <link href="../style/css.css" type="text/css" rel="Stylesheet" />
    <script src="../js/jquery-1.3.2.js" type="text/javascript"></script>
    <script src="../js/common.js" type="text/javascript"></script>
    <script>
         function ChangeSelect()
         {
             var select = document.getElementById("drpSpeciality");
             if(!select.value)
             {
                select.options[select.selectedIndex+1].selected = "selected";
             }
         }
         function showReport() {
             var ApplyType = $("#<%=drpApplyType.ClientID %>").val();
             var Govern = $("#<%=drpGovern.ClientID %>").val();
             //var ApplyName = $("#<%=txtApplyName.ClientID %>").val();
             var Unit = $("#<%=drpUnit.ClientID %>").val();
             var Subject = $("#<%=drpSubject.ClientID %>").val();
             var Speciality = $("#<%=drpSpeciality.ClientID %>").val();
             var ApplyJobRank = $("#<%=drpApplyJobRank.ClientID %>").val();
             window.open("Report/PrintPersonalReport.aspx?ApplyType=" + ApplyType + "&Govern=" + Govern + "&Unit=" + Unit + "&Subject=" + Subject + "&Speciality=" + Speciality + "&ApplyJobRank=" + ApplyJobRank + "","打印报表");
          }
         
         function SetSearch()
         {
            var ApplyType = $("#<%=drpApplyType.ClientID %>");
             var Govern = $("#<%=drpGovern.ClientID %>");
             //var ApplyName = $("#<%=txtApplyName.ClientID %>").val();
             var Unit = $("#<%=drpUnit.ClientID %>");
             var Subject = $("#<%=drpSubject.ClientID %>");
             var Speciality = $("#<%=drpSpeciality.ClientID %>");
             var ApplyJobRank = $("#<%=drpApplyJobRank.ClientID %>");
             var IDCard = $("#<%=txtIDCard.ClientID %>");
             var ApplyName = $("#<%=txtApplyName.ClientID %>");
             var applyStyle = $("#<%=drpApplyStyle.ClientID %>");
             applyStyle.val("-1");
             ApplyType.val("-1");
             Govern.val("-1");
             Unit.empty();
             Unit[0].options.add(new Option("请选择工作单位","-1"));
             Subject.val("-1");
             Subject[0].options.add(new Option("请选择学科组","-1"));
             Speciality.empty();
             Speciality[0].options.add(new Option("请选择申报专业","-1"));
             IDCard.val("");
             ApplyName.val("");
         }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divNavigation">
       当前位置:<a href="OverView.aspx" target="frameControl">信息采集系统</a> >> 个人信息列表
    </div>
        <div id="bodyDiv">
         <div id="divSearch">
            <center>
                <div style="width:98%; text-align:left;"><b>查询条件</b></div>
                <table width="98%" class="Grid">
                     <tr>
                        <td align="right">评审系列</td>
                        <td colspan="3" align="left">
                            <asp:DropDownList ID="drpApplyStyle" runat="server" AutoPostBack="true"
                            onselectedindexchanged="drpApplyStyle_SelectedIndexChanged">
                            <asp:ListItem Text="高级评委会" Value="G"></asp:ListItem>
                            <asp:ListItem Text="社区评委会" Value="S"></asp:ListItem>
                        </asp:DropDownList>
                        <td>
                    </tr>
                    <tr>
                        <td align="right">
                            主管局
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="drpGovern" runat="server" OnSelectedIndexChanged="drpGovern_SelectedIndexChanged" AutoPostBack="true">
                            </asp:DropDownList>
                        </td>
                        <td align="right">
                            工作单位
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="drpUnit" runat="server">
                            <asp:ListItem Text="请选择工作单位" Value="-1"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width:120px;">
                            身份证号
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtIDCard" Height="20px" runat="server" MaxLength="18"></asp:TextBox>
                        </td>
                        <td align="right" style="width:120px;">
                             姓&nbsp;&nbsp;&nbsp;名
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtApplyName" Height="20px" runat="server" width="80px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width:120px;">
                            申报类型
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="drpApplyType" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td align="right">
                            申报职称
                        </td>
                        <td align="left" colspan="3">
                            <asp:DropDownList ID="drpApplyJobRank" runat="server">
                            </asp:DropDownList>
                        </td>
                        
                    </tr>
                    <tr>
                        <td align="right">
                            申报学科组
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="drpSubject" runat="server" OnSelectedIndexChanged="drpSubject_SelectedIndexChanged" AutoPostBack="true">
                                <asp:ListItem Text="请选择学科组" Value="-1"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td align="right">
                            申报专业
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="drpSpeciality" runat="server">
                            <asp:ListItem Text="请选择申报专业" Value="-1"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </center>
            <p>
                <asp:Button ID="butSearch" runat="server" Text="查询" Width="100px" OnClick="butSearch_Click" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%--                <input type="button" id="butNewApply" value="新增" onclick="window.location='NewApply.aspx';"
                    style="width: 100px" />--%>
                  <%--  <asp:Button ID="butShowReport" runat="server" Text="查看报表" Width="120px"  onclick="butShowReport_Click" />--%>
                    <input type="button" id="butShowReport" value ="打印全部报表"  style="width:120px" onclick="showReport()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="button" id="butResetSearch" value="重置查询条件" style="width:120px" onclick="SetSearch()" />
            </p>
        </div>
         <div id="divGrid">
              <asp:HiddenField ID="hiddenSelected" runat="server" />
              <asp:GridView ID="ApplyViewList" runat="server" AutoGenerateColumns="False"  Width="900px"
                CssClass="Grid" AllowPaging="True" PageSize="15">
                <PagerSettings Mode="NumericFirstLast" />
                <Columns>
                    <asp:TemplateField  HeaderText ="打印报表">
                        <ItemTemplate>
                            <a  href="Report/ReportPersonalInfo.aspx?ID=<%#encodeApplyID(Eval("ApplyID").ToString()) %>"  target="_blank">打印报表</a> 
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="评审系列">
                        <HeaderStyle Width="120px" />
                        <ItemStyle Width="120px" />
                        <ItemTemplate>
                            <asp:Label ID="labApplyStyle" Text='<%#Eval("ApplyStyleName") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="工作单位">
                        <ItemTemplate>
                            <asp:Label ID="labGovrenUnit" Text='<%#Eval("UnitGovernName") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="姓 名">
                        <ItemTemplate>
                            <asp:Label ID="labApplyName" Text='<%#Eval("Apply_Name") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="性  别">
                        <ItemTemplate>
                            <asp:Label ID="labGender" Text='<%#Eval("Gender") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="学 历">
                        <ItemTemplate>
                            <asp:Label ID="labEducationLevel" Text='<%#Eval("EducationLevel") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="身份证号">
                        <ItemTemplate>
                            <asp:Label ID="labIDCard" Text='<%#Eval("IDCard") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="申报职称">
                        <ItemTemplate>
                            <asp:Label ID="labJobRankName" Text='<%#Eval("JobRankName") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="申报专业">
                        <ItemTemplate>
                            <asp:Label ID="labSpecialityName" Text='<%#Eval("Speciality") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="申报类型">
                        <ItemTemplate>
                            <asp:Label ID="labApplyType" Text='<%#Eval("ApplyType") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     
                </Columns>
                <AlternatingRowStyle CssClass="ARow" />
            </asp:GridView>
            <div id="divPager">
               <asp:Label ID="labNoRecord" Visible="false" runat="server" Text="查询结果为空!"></asp:Label>
                <webdiyer:aspnetpager id="AspNetPager1" runat="server" PageSize="15" AlwaysShow="True" OnPageChanged="AspNetPager1_PageChanged" ShowCustomInfoSection="Left" CustomInfoSectionWidth="30%" ShowPageIndexBox="always" PageIndexBoxType="DropDownList"
        CustomInfoHTML="第<font color='red'><b>%currentPageIndex%</b></font>页，共%PageCount%页，每页显示%PageSize%条记录"></webdiyer:aspnetpager>
            </div>
         </div>
     </div>
    </form>
</body>
</html>
